<?php

namespace App\Admin\Actions\Grid;

use Dcat\Admin\Grid\Tools\AbstractTool;
use App\Admin\Actions\Form\LiveTextUploadForm;
use Dcat\Admin\Widgets\Modal;

class LiveTextUpload extends AbstractTool
{
    public function html()
    {
        $modal = Modal::make()
            ->lg()->centered()
            ->body(LiveTextUploadForm::make()->payload(['boxId' => $this->getKey()]))
            ->button('<button class="btn btn-primary">上传</button>');

        return $modal;
    }
}
